﻿using LiveCharts;
using System.Globalization;
using System.Windows.Data;

namespace EC3_6CLH.Model
{
    public class IntToPieSegmentConverter : IValueConverter
    {
        public object? Convert(object? value, Type targetType, object? parameter, CultureInfo culture)
        {
            if (value is int intValue)
            {
                return new ChartValues<double> { intValue };
            }

            return null;
        }

        public object? ConvertBack(object? value, Type targetType, object? parameter, CultureInfo culture) => null;
    }
}